#ifndef METADATA_H_
#define METADATA_H_

#include <iostream>
#include <vector>
#include "MetadataOrganization.h"
#include "OrganizationCommons.h"

#ifndef MAX_SIZE_ORGANIZATION
	#define MAX_SIZE_ORGANIZATION 256
#endif

class Metadata
{
protected:
	std::vector<MetadataOrganization*> organizations;
private:
	Metadata();
public:
	virtual ~Metadata();

	static Metadata* GetInstance();
	
	bool is(int handler);
	
	MetadataOrganization * get(int handler);

	void add(MetadataOrganization *organization);
	
	void update(MetadataOrganization *organization);
	
	void remove(int handler);
	
	void load(MetadataOrganization *organization);
	
	void save(int handler);
	
	void save(MetadataOrganization *organization);
	
	void saveAll();
};

#endif /*METADATA_H_*/
